<?php

class ListNode {
    public $val = 0;
    public $next = null;
    public function __construct($val)
    {
        $this->val = $val;
    }
}

class DeleteNode
{
    function deleteNode(ListNode $node)
    {
        $node->val = $node->val->val;
        $node->next = $node->next->next;
    }
}